﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using DevExpress.Xpo.Helpers;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    [Persistent("TopDiscountDetail")]
    public class TopDiscountDetail : BaseObject
    {
        //begin
        public TopDiscountDetail()
        {}
        public TopDiscountDetail(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        private string _DetailId;
        public string DetailId
        {
            get
            {
                return _DetailId;
            }
            set
            {
                SetPropertyValue("DetailId", ref _DetailId, value);
            }
        }
        private string _TargetType;
        public string TargetType
        {
            get
            {
                return _TargetType;
            }
            set
            {
                SetPropertyValue("TargetType", ref _TargetType, value);
            }
        }
        private string _TargetId;
        public string TargetId
        {
            get
            {
                return _TargetId;
            }
            set
            {
                SetPropertyValue("TargetId", ref _TargetId, value);
            }
        }
        private string _TargetName;
        public string TargetName
        {
            get
            {
                return _TargetName;
            }
            set
            {
                SetPropertyValue("TargetName", ref _TargetName, value);
            }
        }
        private string _DiscountType;
        public string DiscountType
        {
            get
            {
                return _DiscountType;
            }
            set
            {
                SetPropertyValue("DiscountType", ref _DiscountType, value);
            }
        }
        private long _DiscountValue;
        public long DiscountValue
        {
            get
            {
                return _DiscountValue;
            }
            set
            {
                SetPropertyValue("DiscountValue", ref _DiscountValue, value);
            }
        }
        private DateTime _Created;
        public DateTime Created
        {
            get
            {
                return _Created;
            }
            set
            {
                SetPropertyValue("Created", ref _Created, value);
            }
        }
        private DateTime _Modified;
        public DateTime Modified
        {
            get
            {
                return _Modified;
            }
            set
            {
                SetPropertyValue("Modified", ref _Modified, value);
            }
        }
        private TopDiscount _TopDiscount;
        [Association("TopDiscountDetails", typeof(TopDiscount))]
        public TopDiscount Discount
        {
            get
            {
                return _TopDiscount;
            }
            set
            {
                SetPropertyValue("TopDiscount", ref _TopDiscount, value);
            }
        }
        //end

    }
}
